home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / factor.z / factor
Text File  |  1998-10-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. FFFFAAAACCCCTTTTOOOORRRR((((1111))))                                                            FFFFAAAACCCCTTTTOOOORRRR((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      factor - obtain the prime factors of a number
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ffffaaaaccccttttoooorrrr [ integer ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      When you use _f_a_c_t_o_r without an argument, it waits for you to give it an
  16.      integer.  After you give it a positive integer less than or equal to 10
  17.      to the 14th (1.0e14), it factors the integer, prints its prime factors
  18.      the proper number of times, and then waits for another integer.  _f_a_c_t_o_r
  19.      exits if it encounters a zero or any non-numeric character.
  20.  
  21.      If you invoke _f_a_c_t_o_r with an argument, it factors the integer as
  22.      described above, and then it exits.
  23.  
  24.      The maximum time to factor an integer is proportional to sqrt(n), _f_a_c_t_o_r
  25.      will take this time when _n is prime or the square of a prime.
  26.  
  27. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  28.      _f_a_c_t_o_r prints the error message, "Ouch," for input out of range.  _f_a_c_t_o_r
  29.      prints the error message ``Q: undefined variable'' for garbage input.
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.